﻿<!--_meta 作为公共模版分离出去-->
<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<head>
	<meta charset="utf-8">
	<meta name="renderer" content="webkit|ie-comp|ie-stand">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
	<meta http-equiv="Cache-Control" content="no-siteapp" />
	<link rel="Bookmark" th:href="@{/favicon.ico}" >
	<link rel="shortcut icon" th:href="@{/favicon.ico}"/>
	<link rel="bookmark" th:href="@{/favicon.ico}"/>
	<link rel="Shortcut Icon" th:href="@{/favicon.ico}" />
	<!--[if lt IE 9]>
	<script type="text/javascript" src="/lib/html5.js"></script>
	<script type="text/javascript" src="/lib/respond.min.js"></script>
	<![endif]-->
	<link rel="stylesheet" type="text/css" href="/static/h-ui/css/H-ui.min.css" />
	<link rel="stylesheet" type="text/css" href="/static/h-ui.admin/css/H-ui.admin.css" />
	<link rel="stylesheet" type="text/css" href="/lib/Hui-iconfont/1.0.8/iconfont.css" />

	<link rel="stylesheet" type="text/css" href="/static/h-ui.admin/skin/default/skin.css" id="skin" />
	<link rel="stylesheet" type="text/css" href="/static/h-ui.admin/css/style.css" />
	<!--[if IE 6]>
	<script type="text/javascript" src="http://lib.h-ui.net/DD_belatedPNG_0.0.8a-min.js" ></script>
	<script>DD_belatedPNG.fix('*');</script><![endif]-->
	<!--/meta 作为公共模版分离出去-->
	<title>创建基地</title>

</head>
<body>
<!--_header 作为公共模版分离出去-->
<div th:replace="common/header::header"></div>
<!--_menu 作为公共模版分离出去-->
<div th:replace="common/menu::menu"></div>

<section class="Hui-article-box">
	<nav class="breadcrumb"><i class="Hui-iconfont"></i> <a href="/index" class="maincolor">首页</a>
		<span class="c-999 en">&gt;</span><span class="c-666">基地中心</span>
		<span class="c-999 en">&gt;</span><span class="c-666">基地管理</span>
		<span class="c-999 en">&gt;</span><span class="c-666">编辑基地</span>
	</nav>
	<div class="Hui-article">
		<article class="cl pd-20">
			<div class="panel panel-default">
				<div class="panel-header">编辑基地</div>
				<div class="panel-body text-c">
					<form class="form form-horizontal" action="/counselor/updateBase" id="editBaseForm">
						<div class="row cl">
							<label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>&nbsp;&nbsp;基地编号：</label>
							<div class="formControls col-xs-8 col-sm-5">
								<input type="text" class="input-text radius"  placeholder="" name="" disabled="disabled" th:value="${base.baseId}">
								<input type="hidden" class="input-text radius"  placeholder="" name="baseId" th:value="${base.baseId}">
							</div>
						</div>
						<div class="row cl">
							<label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>&nbsp;&nbsp;基地名称：</label>
							<div class="formControls col-xs-8 col-sm-5">
								<input type="text" class="input-text radius"  placeholder=""  name="baseName" th:value="${base.baseName}">
							</div>
						</div>

						<div class="row cl">
							<label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>&nbsp;&nbsp;基地人数：</label>
							<div class="formControls col-xs-8 col-sm-5">
								<input type="text" class="input-text radius"   name="baseNum" th:value="${base.baseNum}" disabled="disabled">
							</div>
						</div>
						<div class="row cl">
							<label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>&nbsp;&nbsp;基地描述：</label>
							<div class="formControls col-xs-8 col-sm-5">
								<textarea placeholder="请简述实训时间，人数，内容" name="baseDescription" class="textarea radius" th:text="${base.baseDescription}"></textarea>
							</div>
						</div>
						<div class="row cl">
							<label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>&nbsp;&nbsp;实训公司：</label>
							<div class="formControls col-xs-8 col-sm-5">
								<input type="text" class="input-text radius"  name="companyName" th:value="${company.companyName}" disabled="disabled">
							</div>
						</div>
						<div class="row cl">
							<label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>&nbsp;&nbsp;报到地址：</label>
							<div class="formControls col-xs-8 col-sm-5">
								<input type="text" class="input-text radius"  placeholder="基地负责人填写" name="baseAddress" th:value="${base.baseAddress}" disabled="disabled">
							</div>
						</div>
						<div class="row cl">
							<label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>&nbsp;&nbsp;报到日期：</label>
							<div class="formControls col-xs-8 col-sm-5">
								<input type="datetime-local" class="input-text radius"  placeholder=""  name="baseReportDate" th:field="${base.baseReportDate}" disabled="disabled">
							</div>
						</div>
						<div class="row cl"></div>

						<div class="row cl">
							<div class="col-xs-8 col-sm-5 col-xs-offset-1">
								<button class="btn btn-primary radius" type="submit"><i class="Hui-iconfont">&#xe632;</i> 保存</button>

								<a class="btn btn-default radius" th:href="@{/counselor/baseManage}">&nbsp;&nbsp;取消&nbsp;&nbsp;</a>
							</div>
						</div>
					</form>
				</div>
			</div>

		</article>
	</div>
</section>

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript">
	$(function () {

		$("#editBaseForm").submit(function () {
			if ($("#editBaseForm").valid()) {
				var params = $('#editBaseForm').serializeArray();
				$.ajax({
					type: "POST",
					data: params,
					url: "/counselor/updateBase",
					dataType: "json",
					success: function (data) {
						if (data) {
							layer.msg("修改成功");
						} else {
							layer.msg("修改失败");
						}
						setTimeout('window.location.href="/counselor/baseManage"', 1000);
					}
				});
			}
			return false;//实现页面不刷新
		});

	});



</script>
<!--/请在上方写此页面业务相关的脚本-->
</body>
</html>
